namespace ReportLibrary.Store
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;

    /// <summary>
    /// Summary description for StoreBook.
    /// </summary>
    public partial class StoreBook : Telerik.Reporting.Report
    {   
        public StoreBook()
        {
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent();
        }
        public StoreBook(DateTime p_FromDate,DateTime p_ToDate)
        {
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent();

            
            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            //this.DataSource = Business.ReportFactory.GetStoreBookReport(p_FromDate, p_ToDate).ReportDataSource;
            //this.table2.DataSource = Business.ReportFactory.GetStoreBookDetailReport(p_FromDate, p_ToDate).ReportDataSource;
        }

        private void table2_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.ReportItem table = sender as Telerik.Reporting.Processing.ReportItem;
            if (table.ChildElements.Count == 0)
                table.Visible = false;
        }
    }
}